]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
components: Remove the built-in recorder keybinding and component
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 18 Jul 2013 01:22:54 +0000 (21:22 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 15 Aug 2013 00:39:07 +0000 (20:39 -0400)
The keybinding is now part of gnome-settings-daemon

data/org.gnome.shell.gschema.xml.in.in
js/Makefile.am
js/ui/components/recorder.js [deleted file]
js/ui/sessionMode.js

index 816a1bc4e946bf3cc9fdb997e28da5dd00bf696c..aa289ff5114b935d235312370cd381cdd2520ee4 100644 (file)
@@ -74,7 +74,6 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
       </_description>
     </key>
     <child name="calendar" schema="org.gnome.shell.calendar"/>
-    <child name="recorder" schema="org.gnome.shell.recorder"/>
     <child name="keybindings" schema="org.gnome.shell.keybindings"/>
     <child name="keyboard" schema="org.gnome.shell.keyboard"/>
   </schema>
@@ -128,13 +127,6 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
         Keybinding to focus the active notification.
       </_description>
     </key>
-    <key name="toggle-recording" type="as">
-      <default><![CDATA[['<Control><Shift><Alt>r']]]></default>
-      <_summary>Keybinding to toggle the screen recorder</_summary>
-      <_description>
-        Keybinding to start/stop the builtin screen recorder.
-      </_description>
-    </key>
   </schema>
 
   <schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
@@ -148,44 +140,6 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
     </key>
   </schema>
 
-  <schema id="org.gnome.shell.recorder" path="/org/gnome/shell/recorder/"
-          gettext-domain="@GETTEXT_PACKAGE@">
-    <key name="framerate" type="i">
-      <default>30</default>
-      <_summary>Framerate used for recording screencasts.</_summary>
-      <_description>
-        The framerate of the resulting screencast recordered
-        by GNOME Shell's screencast recorder in frames-per-second.
-      </_description>
-    </key>
-    <key name="pipeline" type="s">
-      <default>''</default>
-      <_summary>The gstreamer pipeline used to encode the screencast</_summary>
-      <_description>
-        Sets the GStreamer pipeline used to encode recordings.
-        It follows the syntax used for gst-launch. The pipeline should have
-        an unconnected sink pad where the recorded video is recorded. It will
-        normally have a unconnected source pad; output from that pad
-        will be written into the output file. However the pipeline can also
-        take care of its own output - this might be used to send the output
-        to an icecast server via shout2send or similar. When unset or set
-        to an empty value, the default pipeline will be used. This is currently
-        'vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux'
-        and records to WEBM using the VP8 codec. %T is used as a placeholder
-        for a guess at the optimal thread count on the system.
-      </_description>
-    </key>
-    <key name="file-extension" type="s">
-      <default>'webm'</default>
-      <_summary>File extension used for storing the screencast</_summary>
-      <_description>
-        The filename for recorded screencasts will be a unique filename
-        based on the current date, and use this extension. It should be
-        changed when recording to a different container format.
-      </_description>
-    </key>
-  </schema>
-
   <schema id="org.gnome.shell.app-switcher"
           path="/org/gnome/shell/app-switcher/"
           gettext-domain="@GETTEXT_PACKAGE@">
index cfaf1048cc856413345b2eda961f395e66103e68..11a1d5f4be29825058da4a3c314b062358176442 100644 (file)
@@ -115,7 +115,6 @@ nobase_dist_js_DATA =       \
        ui/components/automountManager.js       \
        ui/components/networkAgent.js           \
        ui/components/polkitAgent.js            \
-       ui/components/recorder.js               \
        ui/components/telepathyClient.js        \
        ui/components/keyring.js                \
        $(NULL)
diff --git a/js/ui/components/recorder.js b/js/ui/components/recorder.js
deleted file mode 100644 (file)
index 863bd80..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-
-const Lang = imports.lang;
-const Main = imports.ui.main;
-
-const Gio = imports.gi.Gio;
-const Meta = imports.gi.Meta;
-const Shell = imports.gi.Shell;
-
-const Recorder = new Lang.Class({
-    Name: 'Recorder',
-
-    _init: function() {
-        this._recorderSettings = new Gio.Settings({ schema: 'org.gnome.shell.recorder' });
-        this._desktopLockdownSettings = new Gio.Settings({ schema: 'org.gnome.desktop.lockdown' });
-        this._bindingSettings = new Gio.Settings({ schema: 'org.gnome.shell.keybindings' });
-        this._recorder = null;
-    },
-
-    enable: function() {
-        Main.wm.addKeybinding('toggle-recording',
-                              this._bindingSettings,
-                              Meta.KeyBindingFlags.NONE,
-                              Shell.KeyBindingMode.ALL,
-                              Lang.bind(this, this._toggleRecorder));
-    },
-
-    disable: function() {
-        Main.wm.removeKeybinding('toggle-recording');
-    },
-
-    _ensureRecorder: function() {
-        if (this._recorder == null)
-            this._recorder = new Shell.Recorder({ stage: global.stage });
-        return this._recorder;
-    },
-
-    _toggleRecorder: function() {
-        let recorder = this._ensureRecorder();
-        if (recorder.is_recording()) {
-            recorder.close();
-            Meta.enable_unredirect_for_screen(global.screen);
-        } else if (!this._desktopLockdownSettings.get_boolean('disable-save-to-disk')) {
-            // read the parameters from GSettings always in case they have changed
-            recorder.set_framerate(this._recorderSettings.get_int('framerate'));
-            /* Translators: this is a filename used for screencast recording */
-            // xgettext:no-c-format
-            recorder.set_file_template(_("Screencast from %d %t") + '.' + this._recorderSettings.get_string('file-extension'));
-            let pipeline = this._recorderSettings.get_string('pipeline');
-
-            if (!pipeline.match(/^\s*$/))
-                recorder.set_pipeline(pipeline);
-            else
-                recorder.set_pipeline(null);
-
-            Meta.disable_unredirect_for_screen(global.screen);
-            recorder.record();
-        }
-    }
-});
-
-const Component = Recorder;
index 0f8b09170b363d1185395302f784bcf117b2c4d6..eb04c62405f5ece69237d2239012a78003090c1f 100644 (file)
@@ -21,6 +21,7 @@ const _modes = {
         showCalendarEvents: false,
         allowSettings: false,
         allowExtensions: false,
+        allowScreencast: false,
         enabledExtensions: [],
         hasRunDialog: false,
         hasWorkspaces: false,
@@ -83,6 +84,7 @@ const _modes = {
         showCalendarEvents: true,
         allowSettings: true,
         allowExtensions: true,
+        allowScreencast: true,
         hasRunDialog: true,
         hasWorkspaces: true,
         hasWindows: true,
@@ -91,7 +93,7 @@ const _modes = {
         isPrimary: true,
         unlockDialog: imports.ui.unlockDialog.UnlockDialog,
         components: ['networkAgent', 'polkitAgent', 'telepathyClient',
-                     'keyring', 'recorder', 'autorunManager', 'automountManager'],
+                     'keyring', 'autorunManager', 'automountManager'],
         panel: {
             left: ['activities', 'appMenu'],
             center: ['dateMenu'],
@@ -183,10 +185,6 @@ const SessionMode = new Lang.Class({
         return this._modeStack[this._modeStack.length - 1];
     },
 
-    get allowScreencast() {
-        return this.components.indexOf('recorder') != -1;
-    },
-
     _sync: function() {
         let params = this._modes[this.currentMode];
         let defaults;